﻿using System.Collections.Generic;
using System.Linq;
using CkSoftware.GroupMe.Sdk.Core.Dao;
using CkSoftware.GroupMe.Sdk.Messaging.Commands;
using Newtonsoft.Json;

namespace CkSoftware.GroupMe.Sdk.Messaging.Dao
{
	/// <summary>
	/// The data for a group message used by the <see cref="GroupMessagesCreateCommand" />.
	/// </summary>
	public class GroupMessageCreateData
	{
		/// <summary>
		/// Instantiates a new <see cref="GroupMessageCreateData" /> object.
		/// </summary>
		public GroupMessageCreateData()
		{
			Attachments = Enumerable.Empty<GroupMeAttachmentBase>();
			Text = string.Empty;
		}

		/// <summary>
		/// The attachments to add to the new message.
		/// </summary>
		[JsonProperty(PropertyName = "attachments")]
		public IEnumerable<GroupMeAttachmentBase> Attachments { get; set; }

		/// <summary>
		/// An identifier used for client-side deduplication.
		/// </summary>
		[JsonProperty(PropertyName = "source_guid")]
		public string SourceGuid { get; set; }

		/// <summary>
		/// The text for the new message.
		/// </summary>
		[JsonProperty(PropertyName = "text")]
		public string Text { get; set; }
	}
}